forum

home / developersection / forums / edittext field accept only letters and white spaces in android

EditText field accept only letters and white spaces in Android

Anonymous User 10659 19-Oct-2014
I have an EditText field in my project which stands for the full name of the person.So I want only letters and spaces to be allowed in it.So I tried the following in the XML file

android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "

But it didn't work.Can anyone tell me how to do it?

Updated on 19-Oct-2014

I am a content writter !

Can you answer this question?

Answer

2 Answers

Liked By